package com.example.forjava.task;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ATask implements ITask {

    @Resource
    private InvokeService  invokeService;


    @Override
    public String type() {
        return "A";
    }

    @Override
    public void invoke() {
        System.out.println("执行任务A");
    }

//    @Scheduled(fixedRate = 5000)
//    public void task() {
//        invokeService.invoke(type());
//    }
}
